<template>
  <EwgDialog ref="Dialog" @close="close()" modal>
    <div class="store-dialog">
      <div class="header">
        <span>角色背包</span>
        <span class="pointer" @click="close()">关闭</span>
      </div>
      <div class="content">
        <div class="tab-content">
          <TabBox :targetId="targetId"></TabBox>
        </div>
      </div>
      <div class="footer"></div>
    </div>
  </EwgDialog>
</template>
<script lang="ts">
import { ref } from "vue";
import TabBox from "./TabBox.vue";
export default {
  name: "TradeDialog",
  components: {
    TabBox
  },
  setup() {
    const Dialog = ref();
    const targetId = ref(-1);
    const close = () => {
      Dialog.value.close();
    };
    const open = (id: number) => {
      targetId.value = id;
      Dialog.value.open();
    };
    return {
      Dialog,
      close,
      open,
      targetId
    };
  }
};
</script>

<style lang="scss" scoped>
.store-dialog {
  width: 462px;
  background: $--color-black-half-quarter;
  color: #eee;
  border: 3px solid $--color-white;
  padding: 20px;
  border-radius: $--border-radius;
  .header {
    display: flex;
    justify-content: space-between;
  }
  .content {
    margin-top: 5px;
    border-top: 1px solid $--color-white;
    .tab-content {
      padding: 5px 0 5px 8px;
      position: relative;
    }
  }
}
</style>
